import http from "~/utils/http";
export const getMemberConfig = data => {
  return http({
    url: "config/selectOne",
    method: "get",
    data
  });
};
export const getMember = userId => {
  return http({
    url: "memberInfo/selectOne?userId="+userId,
    method: "get"
  });
};
export const buyMember = data => {
  return http({
    url: "memberInfo/buyMember",
    method: "post",
    data
  });
};
export const getMemberList = () => {
  return http({
    url: "memberFreeCourse/list",
    method: "post"
  });
};
export const getMemberInfo = userId => {
  return http({
    url: "memberInfo/configByUserId?userId="+userId,
    method: "get"
  });
};
export const exchangeMember = params => {
  return http({
    url: "memberActivationCode/activate",
    method: "get",
    params
  });
};
export const getExchangeMemberList = data => {
  return http({
    url: "memberActivationCode/list",
    method: "post",
    data
  });
};
